function draw(id) {
    var canvas = document.getElementById(id);
    if (canvas == null)
        return false;
    var ctx = canvas.getContext('2d');
    ctx.lineWidth = 6; //设置圆的宽度
    ctx.strokeStyle = "#163B62"; //设置第一个圆的颜色
    ctx.beginPath();
    ctx.arc(70, 70, 40, 0, Math.PI * 2, true);
    ctx.stroke();
    ctx.strokeStyle = "#000000";
    ctx.beginPath();
    ctx.arc(160, 70, 40, 0, Math.PI * 2, true);
    ctx.stroke();
    ctx.strokeStyle = "#BF0628";
    ctx.beginPath();
    ctx.arc(250, 70, 40, 0, Math.PI * 2, true);
    ctx.stroke();
    ctx.strokeStyle = "#EBC41F";
    ctx.beginPath();
    ctx.arc(110, 110, 40, 0, Math.PI * 2, true);
    ctx.stroke();
    ctx.strokeStyle = "#19814A";
    ctx.beginPath();
    ctx.arc(200, 110, 40, 0, Math.PI * 2, true);
    ctx.stroke();

    //下面开始画出五环环环相扣的样子
    ctx.strokeStyle = "#163B62";
    ctx.beginPath();
    ctx.arc(70, 70, 40, Math.PI * 1.9, Math.PI * 2.1, true);
    ctx.stroke();
    ctx.strokeStyle = "#000000";
    ctx.beginPath();
    ctx.arc(160, 70, 40, Math.PI * 0.9, Math.PI * 2.1, true);
    ctx.stroke();
    ctx.strokeStyle = "#BF0628";
    ctx.beginPath();
    ctx.arc(250, 70, 40, Math.PI * 0.9, Math.PI * 2.1, true);
    ctx.stroke();

    cts.save();

}

// 封装的一个用于绘制圆角矩形的函数.


draw("canvas");